package com.brite.android.game.action;

import org.anddev.andengine.entity.sprite.AnimatedSprite;

import com.badlogic.gdx.math.Vector2;

public class ItemActive {
	public AnimatedSprite itemPrepareActive;
	public AnimatedSprite item;
	boolean isItemActive;
	boolean active;
	boolean wasActive;
	Region regionAffect;
	TimeCounter timeActiveCounter;
	TimeCounter timeExistEffectCounter;
	TimeCounter timeToActiveCounter;
	Cordinate cordinateActive;
	Vector2 velocity;
	
	float[] rotate_;
	int countLoop;
	
	
	public ItemActive() {
	}

	public ItemActive(AnimatedSprite item, boolean isItemActive,
			boolean active, TimeCounter timeActiveCounter,
			TimeCounter timeToActiveCounter, Cordinate cordinateActive) {
		super();
		this.item = item;
		this.isItemActive = isItemActive;
		this.active = active;
		this.wasActive = false;
		this.timeActiveCounter = timeActiveCounter;
		this.timeToActiveCounter = timeToActiveCounter;
		this.cordinateActive = cordinateActive;
	}

	public ItemActive(AnimatedSprite item, boolean isItemActive,
			boolean active, TimeCounter timeActiveCounter,
			TimeCounter timeToActiveCounter, Cordinate cordinateActive,
			Vector2 velocity) {
		super();
		this.item = item;
		this.isItemActive = isItemActive;
		this.active = active;
		this.wasActive = false;
		this.timeActiveCounter = timeActiveCounter;
		this.timeToActiveCounter = timeToActiveCounter;
		this.cordinateActive = cordinateActive;
		this.velocity = velocity;
	}

	public void update(float pSecondsElapsed) {
		item.setPosition(item.getX() + velocity.x*pSecondsElapsed, item.getY() + velocity.y*pSecondsElapsed);
//		itemPrepareActive.setPosition(itemPrepareActive.getX() + velocity.x*pSecondsElapsed, itemPrepareActive.getY() + velocity.y*pSecondsElapsed);
	}
}
